<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="Entidades.*"%>
<%@page import="java.util.*"%>
<%@page import="java.lang.*"%>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Compania de Onibus LTDA</title>
        <link href="css/styles.css" rel="stylesheet" type="text/css" />
        <link href="lib/jqueryui/css/excite-bike/jquery-ui-1.8.16.custom.css" rel="stylesheet" type="text/css" />
        <link rel="stylesheet" href="lib/nivo-slider/themes/default/default.css" type="text/css" media="screen" />
        <link rel="stylesheet" href="lib/nivo-slider/nivo-slider.css" type="text/css" media="screen" />

        <script type="text/javascript" src="lib/jquery.min.js"></script>
        <script type="text/javascript" src="lib/jqueryui/js/jquery-ui-1.8.16.custom.min.js"></script>
        <script type="text/javascript" src="lib/nivo-slider/jquery.nivo.slider.pack.js"></script>
        <script type="text/javascript">
            $(function() {
                jQuery( "input:submit" ).button();
            });
        </script>
    </head>

    <body>

        <!-- TOP -->

        <div id="top">
            <a href="index.html"><img src="images/logo_texto.png" alt="Logo" border="0" style="padding-left: 100px; padding-top: 50px;"/></a>
        </div>


        <!-- HEADER -->

        <div id="header">



            <div id="dadosJSP">
                <%
                    List<String> listaOrigens = new ArrayList<String>();
                    listaOrigens = (List) session.getAttribute("ListaOrigens");

                    List<String> listaDestinos = new ArrayList<String>();
                    listaDestinos = (List) session.getAttribute("ListaDestinos");

                    Iterator ito = listaOrigens.iterator();
                    Iterator itd = listaDestinos.iterator();
                %>


                <h1>Pesquisa Rota</h1><br/><br/>
                <form id="key" action="servletGerencia">
                    Origem :

                    <select name="origem">
                        <%
                            while (ito.hasNext()) {
                                String x = (String) ito.next();
                        %>
                        <option><%=x%><option/>
                        <% }%>
                    </select>
                    <br /><br/><br/>
                    Destino :
                    <select name="destino">
                        <%
                            while (itd.hasNext()) {
                                String x = (String) itd.next();
                        %>
                        <option><%=x%><option/>
                        <% }%>
                    </select>
                    <br><br><br/>
                    <input type="hidden" value="pesquisarota" name="opcao"/>
                    <input id="Procura" class="ok" type="submit" value="Procura"  onclick=" $('key').action='servletGerencia'; return true; ">
                    <input id="Voltar" class="ok" type="submit" value="Voltar"  onclick=" $('key').action='index.html'; return true; ">
                </form>

                <script type="text/javascript">
                    function $(id){
                        return document.getElementById(id);
                    }
                </script>
            </div>
        </div>

    </body>
</html>

